/*
 * Copyright 2016-2018 TVI Go Easy.
 * Created on 2018/1/29 16:31
 */
package com.tvi.cloud.organization.service;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 通过 Netflix Feign Client 调用 Organization 服务
 *
 * @author mechanic
 */
@ConditionalOnClass


@FeignClient(serviceId = "license-service")
public interface LicenseFeignClient {
    @RequestMapping(
            method = RequestMethod.GET,
            value = "/v1/license/{licenseId}",
            consumes = "application/json")
    Object getOrganization(@RequestHeader("Authorization") String authorizationToken, @PathVariable("licenseId") String licenseId);
}
